DESKIE API
Categories of ideas
Create a category
POST  |  https://[domain].deskie.io/api/ideas_category.json
Create a category.
Parameters
Request
{
  "ideas_category" : {
    "category_title" : "Test category"
  }
}
Response
{
  "ideas_category" : {
    "category_id" : 234,
    "category_title" : "Test category",
    "active" : true
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X POST -d '{ "ideas_category": { "category_title":"Test category" }}' https://[domain].deskie.io/api/ideas_category.json
Get a list of categories
GET  |  https://[domain].deskie.io/api/ideas_category.json
Get a list of categories.
Parameters
Response
{
    "0" : {
      "ideas_category" : {
        "category_id" : 234,
        "category_title" : "Test category 1",
        "active" : true
      }
    },
    "1" : {
      "ideas_category" : {
        "category_id" : 235,
        "category_title" : "Test category 2",
        "active" : false
      }
    },
    "total_count":10
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/ideas_category.json?limit=50&page=2
View a category
GET  |  https://[domain].deskie.io/api/ideas_category/[id].json
View a category.
Response
{
  "ideas_category" : {
    "category_id" : 234,
    "category_title" : "Test category",
    "active" : true
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X GET https://[domain].deskie.io/api/ideas_category/234.json
Edit a category
PUT  |  https://[domain].deskie.io/api/ideas_category/[id].json
Edit a category.
Parameters
Request
{
  "ideas_category" : {
    "category_title" : "Test category 2"
  }
}
Response
{
  "ideas_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : true
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '{ "ideas_category": { "category_title":"Test category 2" }}' https://[domain].deskie.io/api/ideas_category/234.json
Deactivate a category
PUT  |  https://[domain].deskie.io/api/ideas_category/[id]/disable.json
Deactivate a category.
Response
{
  "ideas_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : false
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/ideas_category/234/disable.json
 Activate a category
PUT  |  https://[domain].deskie.io/api/ideas_category/[id]/enable.json
 Activate a category.
Response
{
  "ideas_category" : {
    "category_id" : 234,
    "category_title" : "Test category 2",
    "active" : true,
    "created_at" : Mon, 05 May 2014 00:15:17 +0300,
    "updated_at" : Tue, 23 Dec 2014 10:55:23 +0200
  }
}
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X PUT -d '' https://[domain].deskie.io/api/ideas_category/234/enable.json
Delete a category
DELETE  |  https://[domain].deskie.io/api/ideas_category/[id].json
Delete a category.
Response
HTTP Status: 200 OK
Sample code
curl -u [staff_email]:[api_key] -H "Content-Type: application/json" -X DELETE https://[domain].deskie.io/api/ideas_category/234.json